package com.wenlin.userservice.service.impl;

import com.wenlin.userservice.domain.User;
import com.wenlin.userservice.mapper.TestMapper;
import com.wenlin.userservice.mapper.UserMapper;
import com.wenlin.userservice.response.Message;
import com.wenlin.userservice.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/***
 *  Created with IntelliJ IDEA.
 *  User:  wenlin
 *  Date:  2017/11/23
 *  Time:  15:36
 *  Description:
 **/
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;

    @Autowired
    private TestMapper testMapper;

    /***
     *  User:  wenlin
     *  Date:  2017/11/23
     *  Time:  16:01
     *  Description:
     **/
    @Override
    public Message<User> selectByPrimaryId(Integer id) {
        testMapper.select(1);
        User user = userMapper.selectByPrimaryKey(id);
        return new Message<>(user);
    }
    /***
     *  User:  wenlin
     *  Date:  2017/11/23
     *  Time:  16:01
     *  Description:
     **/
    @Override
    public Message updateByPrimaryId(Integer id) {
        return null;
    }
}
